compiletest: Slightly simplify the handling of debugger directive prefixes#134849
compiletest: Slightly simplify the handling of debugger directive prefixes#134849bors merged 2 commits intorust-lang:masterfrom
Conversation
There are no tests in `tests/debuginfo` that use this prefix.
|
r? @clubby789 rustbot has assigned @clubby789. Use |
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
| let prefixes = { | ||
| static PREFIXES: &[&str] = &["cdb", "cdbg"]; | ||
| // No "native rust support" variation for CDB yet. | ||
| PREFIXES | ||
| }; | ||
|
|
||
| // Parse debugger commands etc from test files | ||
| let dbg_cmds = DebuggerCommands::parse_from(&self.testpaths.file, self.config, prefixes) | ||
| let dbg_cmds = DebuggerCommands::parse_from(&self.testpaths.file, self.config, "cdb") |
There was a problem hiding this comment.
I did some digging, this was introduced in the very original PR that added cdb support, i.e. #60970. There was no discussion about cdbg in the PR either.
Possibilities:
- This refers to some project that never really materialized: https://handmade.network/forums/wip/t/3017-windows_debugger
- This is actually referring to cgdb, https://cgdb.github.io
In any case, none of the debuginfo tests use it.
There was a problem hiding this comment.
At that time, gdb had the prefixes [gdb, gdbr, gdbg], and similarly for lldb.
I think the idea was that r would only apply when using a Rust-aware debugger, and g would only apply when using a non-Rust-aware debugger.
I imagine that the PR author copied what the other debuggers were doing, but without the r variant as there was no Rust-aware cdb (hence the mysterious comment about no "native Rust support").
Later, the whole r/g distinction was removed from gdb/lldb by #129218. But cdb was not updated, so the useless g remained.
|
Thanks for the cleanup! @bors r=lqd,clubby789,jieyouxu rollup |
Rollup of 3 pull requests Successful merges: - rust-lang#134849 (compiletest: Slightly simplify the handling of debugger directive prefixes) - rust-lang#134850 (Document virality of `feature(rustc_private)`) - rust-lang#134852 (Added a codegen test for optimization with const arrays) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134849 - Zalathar:debuginfo-prefixes, r=lqd,clubby789,jieyouxu compiletest: Slightly simplify the handling of debugger directive prefixes The `cdbg-` prefix is not used by any tests in `tests/debuginfo`, and perhaps there never were any tests that used it. Getting rid of it also lets us get rid of the code for parsing multiple prefixes at the same time, since every debugger now has exactly one prefix.

The
cdbg-prefix is not used by any tests intests/debuginfo, and perhaps there never were any tests that used it.Getting rid of it also lets us get rid of the code for parsing multiple prefixes at the same time, since every debugger now has exactly one prefix.